﻿
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PR_SalaryDetail.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PR_SalaryDetail" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>อัตราเงินเดือน</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>  

<script type="text/javascript">   

          function isNumberKey(event)  // ตัวเลขอย่างเดียว
          {
             var charCode = (event.which) ? event.which : event.keyCode
             if(charCode > 31 && (charCode < 48 || charCode > 57)){
//                 alert("กรอกได้แต่ตัวเลขครับ!")
                 return false;
	          }
             return true;
          }
          function isNumberKeyDot(event)  // ตัวเลขทศนิยม
          {
             var charCode = (event.which) ? event.which : event.keyCode
             if(charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 46){
             //    alert("กรอกได้แต่ตัวเลขทศนิยมครับ!")
                 return false;
	          }
             return true;
          }
           function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
                function CloseAndRebind(args) {
                    GetRadWindow().BrowserWindow.refreshGrid(args);
                    GetRadWindow().close();
                }

                function GetRadWindow() {
                    var oWindow = null;
                    if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)

                    return oWindow;
                }


</script>
      
        <br />
      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>
    
    <title>กำหนดกลุ่มตารางเงินเดือน</title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 
    
      <asp:panel ID="Panel6" runat="server" >
    <table width="700" cellpadding="0" cellspacing="0">
        <tr>
            <td width="280" valign = "top">
            </td>
            <td width="20" >
            </td>
            <td>
            </td>
          </tr>
          <tr>
          <td colspan = "3">
        <div class="moduleDivSlim700">
        <div class="moduleDivBottom700">
        <table align="center" width ="700px" >
        <tr>
            <td align="left" class="tableHeader">
                บันทึกรายละเอียดบัญชีเงินเดือน<asp:Label ID="lblID" runat="server" 
                    Visible="False"></asp:Label>
                <asp:Label ID="lblCountItem" runat="server" Visible="False"></asp:Label>
            </td>
        </tr>
        </table>
        <table width ="700px" >
        <tr>
        <td >
        <asp:Panel ID="PanelGrid" 
            runat="server" 
            Width="700px" 
            Height="350px" ScrollBars="Auto" >
                <telerik:RadGrid ID="RadGrid2" runat="server" 
                    AllowAutomaticDeletes="True" 
                    AllowMultiRowEdit="True" 
                    AllowMultiRowSelection="True" AllowPaging="True" 
                    AllowSorting="True" 
                    AutoGenerateColumns="False" EnableAJAX="True" 
                    EnableAJAXLoadingTemplate="True" GridLines="None" 
                    OnItemCommand="RadGrid2_ItemCommand" Skin="Outlook" Width="690px" 
                    onitemcreated="RadGrid2_ItemCreated" 
                    onitemdatabound="RadGrid2_ItemDataBound">
                    <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" 
                        ClientDataKeyNames="grp_dtls_seq" 
                        CommandItemDisplay="Top" DataKeyNames="grp_dtls_seq" 
                        InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                        NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                        <CommandItemTemplate>
                            <table width="100%">
                                <tr>
                                    <td>
                                        <asp:LinkButton ID="cmdAddNew" runat="server" CausesValidation="False" 
                                            CommandName="InitInsert" 
                                            Visible="<%# !RadGrid2.MasterTableView.IsItemInserted && RadGrid2.EditIndexes.Count <= 0 %>">
                                        <img alt="" src="../Images/Buttons/AddRecord.gif" 
                                            style="border: 0px; vertical-align: middle;" /> เพิ่มรายละเอียดบัญชีเงินเดือน</asp:LinkButton>
                                        &nbsp;&nbsp;
                                    </td>
                                    <td align="right">
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
  
                               
                        <ExpandCollapseColumn Visible="True">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                                EditText="คลิกเพื่อแก้ไขข้อมูล">
                                <ItemStyle Width="15px" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
                                ConfirmDialogType="RadWindow" ConfirmText="ลบข้อมูลที่เลือก?" 
                                Text="คลิกเพื่อลบข้อมูล" UniqueName="column1">
                                <HeaderStyle HorizontalAlign="Center" Width="10px" />
                                <ItemStyle HorizontalAlign="Center" Width="10px" />
                            </telerik:GridButtonColumn>
                            <telerik:GridBoundColumn 
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                DataFormatString = "{0:N0}"
                                DataField="sal_tmp"
                                HeaderText="เงินเดือนขั้นต่ำชั่วคราว" 
                                UniqueName="sal_tmp">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn 
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                DataFormatString = "{0:N0}"
                                DataField="sal_min" 
                                HeaderText="เงินเดือนขั้นต่ำ" 
                                UniqueName="sal_min">
                            </telerik:GridBoundColumn>                            
                            <telerik:GridBoundColumn 
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                DataFormatString = "{0:N0}"
                                DataField="sal_max" 
                                HeaderText="เงินเดือนขั้นสูง" 
                                UniqueName="sal_max">
                            </telerik:GridBoundColumn>                    
                        </Columns>
                        <EditFormSettings EditFormType="WebUserControl" 
                            UserControlName="../UserControls/PR_SalaryDetail.ascx">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </MasterTableView>
                    <ClientSettings AllowColumnHide="True" 
                        AllowColumnsReorder="True" 
                        EnableRowHoverStyle="True" 
                        ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                    </ClientSettings>
                </telerik:RadGrid>
            </asp:Panel>
                </td>
                </tr>
                </table>
                </div>
</div>
</td>
</tr>
</table>
</asp:panel>

    
    
    </div>
    </form>
</body>
</html>